#ifndef  __WAVEEXCEPTION_H__
#define  __WAVEEXCEPTION_H__

#include "seq/MidiException.h"

namespace wave {

class WaveException : public seq::SeqException {
public:
    WaveException() {
        SeqException::SeqException("WaveException");
    }

    WaveException(const char* msg) : SeqException(msg) {}
    WaveException(const std::string& msg) : SeqException(msg) {}

    WaveException(const std::string& msg, const std::string& file, long line) {
        std::ostringstream ost;
        ost << "WaveException" << std::endl;
        ost << "    [" << msg << "]" << std::endl;
        ost << "    at " << file << "(" << line << ")";
        msg_ = ost.str();
    }

    virtual ~WaveException() {}
public:
    virtual const char* what() const { return msg_.c_str(); }
};

} // end of namespace wave

#endif   /* ----- #ifndef __WAVEEXCEPTION_H__  ----- */
